<layout name='layout_page' />

<div class="row">
	<div class="col-lg-12">
		<div class="row">
			<div class="col-lg-12">
				<ol class="breadcrumb">
					<li><a href="<{:U('Index/index')}>"><{:L('_menu_home')}></a></li>
					<li class="active"><span>Events</span></li>
				</ol>
				<h1>Events</h1>
			</div>
		</div>
		<div class="row">
			<div class="col-lg-12">
				<div class="main-box clearfix">
					<div class="email-detail-nano-content" style="padding: 10px;">
						<div id="email-detail-inner">
							<div id="email-detail-subject" class="clearfix"> <span class="subject"><{$list.event.title}></span><a href="/index.php?m=Home&c=Events&a=view&id=<{$list.eventID}>" target="_blank" class="btn btn-primary"><i class="fa fa-eye"></i>  View</a></div>
							<div id="email-detail-sender" class="clearfix" style="padding: 10px 0 10px 0px">
								<div class="users">
									<div class="from clearfix">
										<div class="name" style="margin-right:30px;">Date:<{$list.event.date|date="F,d,Y",###}></div>
										<div class="name">Time:<{$list.event.time}></div>
									</div>
									<div class="to"> Address: <span><{$list.event.address}></span> </div>
								</div>
							</div>
						</div>
					</div>
					<div class="main-box-body clearfix">
						<h3><span>My information</span></h3>
							<form id="ajaxForm" action="/index.php?m=Mentees&c=Events&a=edit" method="post" class="eventForm form-validata" novalidate="novalidate">
							<div class="row" style="margin-bottom: 30px;">
								<div class="col-xs-3"><input type="text" name="firstName" id="firstName" class="form-control input-lg valid" placeholder="First Name" data-rule-required="true" value="<{$list.firstName}>"></div>
								<div class="col-xs-3"><input type="text" name="lastName" id="lastName" class="form-control input-lg valid" placeholder="Last Name" data-rule-required="true" value="<{$list.lastName}>"></div>
								<div class="col-xs-6"><input type="email" name="email" id="email" class="form-control input-lg valid" placeholder="Email" data-rule-required="true" data-rule-email="true" value="<{$list.email}>"></div>
							</div>
							<div class="row" style="margin-bottom: 30px;">
								<div class="col-xs-3"><input type="text" name="school" id="school" class="form-control input-lg valid" placeholder="School" data-rule-required="true" value="<{$list.school}>"></div>
								<div class="col-xs-3"><input type="text" name="major" id="major" class="form-control input-lg valid" placeholder="Major" data-rule-required="true" value="<{$list.major}>"></div>
								<div class="col-xs-3"><input type="text" name="wechat" id="wechat" class="form-control input-lg valid" placeholder="Wechat ID" data-rule-required="true" value="<{$list.wechat}>"></div>
							</div>
							<div class="row">
								<div class="col-xs-3">
									<?php if($list['status']==1){ ?>
									<a href="javascript:void(0)" onclick="history.go(-1)" class="btn btn-primary"><i class="fa fa-reply"></i>  Back</a>
									<?php }else{ ?>
									<button type="submit" class="btn btn-success btn-lg" id="form-btn">Submit</button>
									<?php } ?>
									<span id="msg"></span>
								</div>
							</div>
							<input type="hidden" name="event" value="<{$list.event.title}>">
							<input type="hidden" name="eventID" value="<{$list.eventID}>">
							<input type="hidden" name="userid" value="<{$list.userid}>">
							<input type="hidden" name="id" value="<{$list.id}>">
						</form>
					</div>
				</div>
			</div>
		</div>	
	</div>
</div>
<script type="text/javascript">
$(function(){
	ajaxForm();
});
</script>